/* Ty, a programming language interpreter
 * Copyright (C) 2007 Nick Thomas
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef TY_MEM_H
#define TY_MEM_H

#include <stdint.h>

/* Memory allocation functions. These wrap malloc(), and terminate the program
 * if out of memory. The rationale for this lack of error handling is that it
 * would be more effort than it's worth to do the right thing and propagate
 * the errors back up, since it would affect essentially every piece of code
 * in the system.
 */

void *ty_malloc(uintptr_t size);
void *ty_realloc(void *data, uintptr_t size);
void ty_free(void *data);

#endif
